<?php
/**
 * Nweb Editor
 *
 * This script is protected by copyright. Its use, copying, modification
 * and distribution without written consent of the author is prohibited.
 *
 * @category    source
 * @package     pl.nweb.editor.model
 * @subpackage  table
 * @author      Krzysztof Kardasz <krzysztof.kardasz@gmail.com>
 * @copyright   Copyright (c) 2012 Krzysztof Kardasz
 * @license     http://www.gnu.org/licenses/lgpl-3.0.txt  GNU Lesser General Public
 * @version     1.0 $Id$
 * @link        https://nweb-editor.googlecode.com
 * @link        http://editor.nweb.pl
 */

namespace pl\nweb\editor\app\model\gateway\table;

/**
 * Model tabeli
 *
 * @category    source
 * @package     pl.nweb.editor.model
 * @subpackage  table
 * @author      Krzysztof Kardasz <krzysztof.kardasz@gmail.com>
 * @copyright   Copyright (c) 2012 Krzysztof Kardasz
 * @version     1.0 $Id$
 */
class Media extends \pl\nweb\editor\app\model\gateway\Table
{
    /**
     * Nazwa tabeli
     *
     * @var string
     */
    protected $_name = self::TABLE;

    /**
     * Klucz podstawowy
     *
     * @var string
     */
    protected $_primary = self::FIELD_ID;

    /**
     * Klasa wiersza tabeli
     *
     * @var string
     */
    protected $_rowClass = '\\pl\\nweb\\editor\\model\\gateway\\row\\Media';

    /**
     * Nazwa tabeli
     */
    const TABLE = 'tbl_mda_media';

    /**
     * Pola tabeli
     */
    const FIELD_ID       = 'mda_id';
    const FIELD_CLASS    = 'mda_class';
    const FIELD_NAME     = 'mda_name';
    const FIELD_FILESIZE = 'mda_filesize';
    const FIELD_FILENAME = 'mda_filename';
    const FIELD_MIMETYPE = 'mda_mimetype';
    const FIELD_METADATA = 'mda_metadata';
    const FIELD_CHECKSUM = 'mda_checksum';
    const FIELD_CREATED  = 'mda_created';
    const FIELD_STATUS   = 'mda_status';

    /**
     * Status
     */
    const STATUS_ACTIVE  = 1;
    const STATUS_DRAFT   = 2;
    const STATUS_DELETED = 9;
}